<template>
	<view>

		<cu-custom bgColor="#2AAC34" isBack v-if="showCustom">
			<block slot="content">
				<view class="header-fix">
					<!-- 	<image @click="chooseLocation" style="width: 28rpx;height: 38rpx;margin-left: 10rpx;" src="../../static/index/dingweiweizhi@3x.png"
					 mode=""></image> -->
					<image src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/1c66abd1c3054e589e82766af1fd9f4b.png" mode="" style="height: 40rpx;width: 154rpx;margin-left: 15rpx;"></image>
					<view class="header-fix-main">
						<view class="" style="position: relative;">
							<input @click="naviageToPage('/pages/product/search')" style="width: 330rpx;height: 60rpx;background: #FFFFFF;opacity: 0.8;border-radius: 30rpx;"
							 type="text" value="" />
							<view class="" style="position: absolute;top: 0rpx;left: 130rpx;display: flex;align-items: center;height: 60rpx; ">
								<image @click="naviageToPage('/pages/product/search')" style="width: 29rpx;height: 29rpx;" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/69514cc278d3434389056e361e4d848e.png"
								 mode=""></image>
								<text @click="naviageToPage('/pages/product/search')" style="font-size: 24rpx;font-family: PingFang SC;font-weight: 400;color: #000000;opacity: 0.5;margin-left: 10rpx;">搜索</text>
							</view>
						</view>
					</view>
				</view>
			</block>
		</cu-custom>
		<view class="head" id="head">
			<swiper v-if="storage" class="swiper" :indicator-dots="indicatorDots" :autoplay="autoplay" :interval="interval"
			 :duration="duration">
				<swiper-item v-for="item in carouselList">
					<view class="swiper-item uni-bg-red" @click="naviageToPage('/pagesA/xinrenzhuanxing/xinrenzhuanxing')">
						<image :src="item.imgUrl" mode=""></image>
					</view>
				</swiper-item>
			</swiper>

			<!-- 位置区域 :style="'top:' + navbarTop * 2 + 'px;height:' + navHeight + 'px;'"-->
			<view class="tubiaoqu" :style="{position:'absolute',top: StatusBar+'px',height:(CustomBar-StatusBar) +'px'}" style="width: 160rpx;">
				<image src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/1c66abd1c3054e589e82766af1fd9f4b.png" mode="" style="height: 40rpx;width: 154rpx;margin-left: 15rpx;"></image>
			</view>

			<view class="weizhiquyu" :style="{top:(CustomBar+5)+'px'}">
				<image @click="chooseLocation" style="width: 28rpx;height: 38rpx;margin-left: 10rpx;" src="../../static/index/dingweiweizhi@3x.png"
				 mode=""></image>
				<view @click="chooseLocation" class="" style="font-size: 30rpx;font-family: PingFang SC;font-weight: bold;color: #FFFFFF;width: 120rpx;overflow: hidden;height: 40rpx;">{{district}}</view>

				<view class="" style="position: relative;">
					<input @click="naviageToPage('/pages/product/search')" style="width: 450rpx;height: 60rpx;background: #FFFFFF;opacity: 0.8;border-radius: 30rpx;"
					 type="text" value="" />
					<view class="" style="position: absolute;top: 0rpx;left: 180rpx;display: flex;align-items: center;height: 60rpx; ">
						<image @click="naviageToPage('/pages/product/search')" style="width: 29rpx;height: 29rpx;" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/69514cc278d3434389056e361e4d848e.png"
						 mode=""></image>
						<text @click="naviageToPage('/pages/product/search')" style="font-size: 24rpx;font-family: PingFang SC;font-weight: 400;color: #000000;opacity: 0.5;margin-left: 10rpx;">搜索</text>
					</view>
				</view>
				<view class="tad">
					<image style="width: 50rpx;height: 50rpx;" src="../../static/index/caidan2.png" mode=""></image>
				</view>

			</view>
			<!-- 广告区域 -->
			<view v-if="storage" v-show="tongzhishow" class="guanggao">
				<view>{{newTimesContent}}</view>
				<image @click="tongzhiBtn" class="guanggao-img" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/1745c5f5794143acbe53de9804bd4d24.png"
				 mode=""></image>
			</view>
		</view>
		<!-- 条件区域 -->
		<view id="bar" class="padding bg-white " style="display: flex;align-items: center;justify-content: space-between;background-color: #f1f1f1;">
			<view class="flex align-center">
				<image src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/954cc13beb134acc95f7124b34e54f41.png" mode="aspectFit"
				 style="width: 32rpx;height: 32rpx;"></image>
				<text class=" lem-text-gray" style="font-size: 24rpx;margin-left: 14rpx;">天天特价</text>
			</view>
			<view class="flex align-center">
				<image src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/43b3beadd8d5404e8b3fd428f08ca000.png" mode="aspectFit"
				 style="width: 32rpx;height: 32rpx;"></image>
				<text class=" lem-text-gray" style="font-size: 24rpx;margin-left: 14rpx;">平台优选</text>
			</view>
			<view class="flex align-center">
				<image src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/26415f82765a4abb9afd1d633fa463cd.png" mode="aspectFit"
				 style="width: 32rpx;height: 32rpx;"></image>
				<text class=" lem-text-gray" style="font-size: 24rpx;margin-left: 14rpx;">售后无忧</text>
			</view>
			<view class="flex align-center">
				<image src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/bd5bebd61681407082c657d1a53545bd.png" mode="aspectFit"
				 style="width: 32rpx;height: 32rpx;"></image>
				<text class=" lem-text-gray" style="font-size: 24rpx;margin-left: 14rpx;">30分钟送达</text>
			</view>
		</view>
		<!-- 分类列表 -->
		<view class="list" v-if="storage">
			<view class="listitem" v-for="(item, index) in categoryButtomList" :key="index" @click="naviageToPage(item.url, item.title)">
				<image :src="item.imgUrl" mode=""></image>
				<view class="md">{{ item.title }}</view>
			</view>
		</view>

		<!-- 一分购 -->
		<view class="xianshimiaosha" v-if="storage" style=" background: url('https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/c909303027474f15b666102416b9bfd2.png');background-size: 100% 100%;">
			<view class="xianshimiaoshatop">

				<image class="xianshitupian" style="width: 170rpx;height: 48rpx;" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/03f0afb9376345f4a3212bf36c0eae67.png"
				 mode=""></image>

				<view class="xianshixian">

				</view>
				<view class="xianshitimeyi">
					<image class="tupoian" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/099f95724fce4cc2b5fc9a7fa9debb30.png"
					 mode=""></image>
				</view>
				<image class="xianshiallyi" @click="naviageToPage('/pagesA/xinrenzhuanxing/xinrenzhuanxing')" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/2fbae5a9dfaa4005a4fdb04b5dc0e173.png"
				 mode=""></image>
				<!-- <image class="xianshiallyi" @click="naviageToPage('/pages/Invitation/Invitation')" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/2fbae5a9dfaa4005a4fdb04b5dc0e173.png"
				  mode=""></image> -->

			</view>
			<view class="xianshishangpin">
				<view class="" style="width: 100%;height: 15rpx;">

				</view>
				<view class="xianshishangpindiv" :style="'width:'+ (yifengouchangdu*210)+'rpx'">
					<view class="xianshijiaru" v-for="item in yifengouList" @click="naviageToPage('/pagesA/xinrenzhuanxing/xinrenzhuanxing')">
						<view class="sptupian">
							<image class="sptupianimg" :src="item.img" mode=""></image>
						</view>
						<view class="xianshengname">
							{{item.title}}
						</view>
						<view class="xianjiage">
							<text class="goumaijiage">

								<text style="font-size:20rpx ;margin-right: 4rpx;">￥</text>
								0.01</text>
							<text class="yuanjiage">
								<text style="font-size:18rpx;">￥</text>
								{{item.originalPrice/100}}</text>
						</view>
						<view class="xinshijiargwc" style="background: linear-gradient(90deg, #FC5A5A 0%, #EA2A2A 100%);">

							<text style="margin-top: 6rpx;">立即抢购</text>
						</view>

					</view>

				</view>
			</view>
		</view>
		<!-- 限时秒杀 -->
		<view class="xianshimiaosha" v-if="storage" style="margin-top: 20rpx;">
			<view class="xianshimiaoshatop">
				<image class="xianshitupian" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/79d77bbed3a1499e969e41a56035cc94.png"
				 mode=""></image>
				<view class="xianshixian">
				</view>
				<view class="xianshitime">
					<countdown @Transmit="handle" :startTime="startTime" :endTime="enTime" />
				</view>
				<image @click="naviageToPage('/pagesA/discount/seckill')" class="xianshiall" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/b4f0ba15bc7b49429c5747927320cc0a.png"
				 mode=""></image>

			</view>
			<view class="xianshishangpin">
				<view class="" style="width: 100%;height: 15rpx;">

				</view>
				<view class="xianshishangpindiv" :style="'width:'+ (xianshimiaochangdu*210)+'rpx'">
					<view class="xianshijiaru" v-for="item in xianshimiaoList">
						<view class="sptupian">
							<image @click="navToDetail(item.spuId)" class="sptupianimg" :src="item.img" mode=""></image>
							<!-- 即将售空 -->
							<image class="dingweiimg" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/373176da5fbe4804941ee91b8816741a.png"
							 mode=""></image>

						</view>
						<view class="xianshengname">
							{{item.title}}
						</view>
						<view class="xianjiage">
							<text class="goumaijiage">

								<text style="font-size: 20rpx;margin-right: 4rpx;">￥</text>
								{{item.minPrice/100}}</text>
							<text class="yuanjiage">
								<text style="font-size:18rpx;">￥</text>
								{{item.maxPrice/100}}</text>
						</view>
						<view class="xinshijiargwc" @click="jiarugwBtn(item)">

							<text style="margin-top: 6rpx;">加入购物车</text>
						</view>

					</view>

				</view>
			</view>
		</view>


		<!-- 新鲜时报 -->

		<view class="bao" v-if="storage">
			<image src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/b2446d96eb764983b045549c5313c8eb.png" mode="" style="z-index: 99;padding:0 ;"></image>
			<view style="width: 550rpx;color: #3C6B41;font: 26rpx;" class="padding-left-sm margin-left-sm newtimes text-df">{{newTimesContent}}</view>
		</view>

		<!-- 下拉列表 -->
		<view class="swipeMian" v-if="storage">
			<view class="swiperMain">
				<view class="swiperHead" :style="{top:CustomBar+'px'}">
					<!--组件-->
					<swiperNavBar :scrollIntoView="scrollIntoView" :swiperTabList="swiperTabList" :swiperTabIdx="swiperTabIdx"
					 :currentSwiperWidth="currentSwiperWidth" :currentSwiperHeight="currentSwiperHeight" :swiperCurrentSize="swiperCurrentSize"
					 :swiperColor="swiperColor" :swiperCurrentColor="swiperCurrentColor" :currentSwiperLineShow="currentSwiperLineShow"
					 :currentSwiperLineActiveWidth="currentSwiperLineActiveWidth" :currentSwiperLineActiveHeight="currentSwiperLineActiveHeight"
					 :currentSwiperLineActiveBg="currentSwiperLineActiveBg" :currentSwiperLineAnimatie="currentSwiperLineAnimatie"
					 v-if="swiperTabList.length > 1" @change="CurrentTab"></swiperNavBar>
					<!--组件-->
				</view>

				<!--内容-->
				<view class="" v-show="!tuijianShow" style="min-height: 100vh;">
					<!-- 商品 -->
					<view class="shangpinneirong" style="margin-top: 20rpx;" v-for="item in fenleilisr">
						<view class="shangpintupian">
							<image @click="navToDetail(item.spuId)" class="imgdaxiao" :src="item.spuImg" mode=""></image>

							<image v-show="item.stock<=0" class="mengcheng" src="../../static/xintupian/mengcheng.png" mode=""></image>
						</view>
						<view class="shangpinjiaru">
							<view class="shangpinname">
								{{item.spuTitle}}
							</view>
							<view class="shangpinjianjie">
								{{item.spuTitle}}
							</view>
							<view class="shangpinjiarub">
								<view class="shangpinjiarubleft">
									<text class="shangpxianz">
										<text style="font-size: 20rpx;">￥</text>
										{{item.spuPrice/100}}</text>
									<text class="shangpingq">
										<text style="font-size:18rpx;">￥</text>
										{{item.spuOriginalPrice/100}}</text>
								</view>
								<view class="shangpinjiarubright" @click="jiarugwBtn(item)">
									<text style="margin-top: 6rpx;">加入购物车</text>
								</view>
							</view>

						</view>

					</view>

				</view>

				<view class="" v-show="tuijianShow">

					<view class="" v-for="item in tuijiannList">
						<!-- 商品 -->
						<view class="shangpinneirong" style="margin-top: 20rpx;" v-if="item.code==1">
							<view class="shangpintupian">
								<image @click="navToDetail(item.data.spuId)" class="imgdaxiao" :src="item.data.spuImg" mode=""></image>

								<image v-show="item.data.stock<=0" class="mengcheng" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/fc6c15840dfa4f118a937981da277d31.png"
								 mode=""></image>
							</view>
							<view class="shangpinjiaru">
								<view class="shangpinname">
									{{item.data.spuTitle}}
								</view>
								<view class="shangpinjianjie">
									{{item.data.spuTitle}}
								</view>
								<view class="shangpinjiarub">
									<view class="shangpinjiarubleft">
										<text class="shangpxianz">
											<text style="font-size: 20rpx;">￥</text>
											{{item.data.spuPrice/100}}</text>
										<text class="shangpingq">

											<text style="font-size:18rpx;">￥</text>
											{{item.data.spuOriginalPrice/100}}</text>
									</view>
									<view class="shangpinjiarubright" @click="jiarugwBtn(item.data)">

										<text style="margin-top: 6rpx;">加入购物车</text>
									</view>
								</view>

							</view>

						</view>
						<!-- 附近邻居 -->
						<view class="fujinlinju" v-if="item.code==2">
							<view class="fujinlinjutop">
								<view class="fujinlinjutopleft">
									<text class="douzainame">附近邻居都在买</text>
									<text class="diandian"></text>
									<text class="fenfenz">分分钟卖断货</text>
								</view>
								<view class="fujinlinjutopright">
									<text class="chkanquanbu" @click="navTotuijian(-1)">查看全部</text>
									<image class="allimg" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/cbaf97c68eb4417b8384bcf059e17497.png"
									 mode=""></image>
								</view>
							</view>
							<view class="fujinlinjubom">
								<view class="" style="width: 100%; height: 15rpx;">

								</view>
								<view class="fujinlinjubomdiv" :style="'width:'+ (6*210)+'rpx'">
									<view class="fujianshangpin" v-for="items in item.data">
										<image @click="navToDetail(items.spuId)" class="imgname" :src="items.spuImg" mode=""></image>
										<view class="shangjiage" style="font-size:32rpx ;">

											<text style="font-size:20rpx ;margin-right: 4rpx;">￥</text>
											{{items.spuPrice/100}}
										</view>

									</view>
								</view>

							</view>
						</view>
						<!-- 猜你喜欢 -->
						<view class="cainixinhuan" v-if="item.code==3">
							<view class="cainixinhuanTop">
								猜你喜欢
							</view>
							<view class="cainixinhuansj">
								<view class="cainixinhuansjdiv" v-for="itemd in item.data " @click="cainixihbTn(itemd)">
									<image class="imgurl" :src="itemd.picUrl" mode=""></image>
									<text class="xinxiansg">{{itemd.title}}</text>
									<image class="jiantou" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/62bed4bfad7e4fe6a2c588409e02f211.png"
									 mode=""></image>
								</view>

							</view>
						</view>
					</view>



				</view>

			</view>

		</view>
		<!-- <view v-if="!storage" style="padding-top: 180rpx;padding-bottom: 180rpx;">
			<missing :buttonName="'换个地址试试吧~'" :handlerName="'buttonClick'" @buttonClick="chooseLocation" :imgUrl="'http://qiniuoss.nauzone.cn/%E7%BB%84%204%20%E6%8B%B7%E8%B4%9D@3x.png'"
			 :desc="'当前地区不在配送范围哦'"></missing>
		</view> -->


		<!-- 活动弹框 -->
		<view class="Bigmask" :class="ismask ? 'opAC' : 'op'"></view>
		<view class="maskBox" :class="ismask ? 'scAC' : 'sc'">
			<image src="../../static/Invitation/close.png" mode="" class="maskClose" @click.stop="ismask = false" style="z-index: 999;"></image>
			<image :src="t5.imgUrl" mode="" class="mask" @click="goManjian()"></image>
			<!-- naviageToPage('../Invitation/Invitation') -->
		</view>
		<image class="coupon" @click="coupon" src="https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/76625784c9694401a6d55650b5a4476e.png"
		 mode=""></image>

		<!-- <view class="gudingdinwei" :style="{ height:(this.CustomBar - this.StatusBar) + 'rpx',position: 'fixed',top:this.StatusBar+'px' }">
			1
		</view> -->
	</view>
</template>

<script>
	import missing from '@/components/missing.vue';
	import swiperNavBar from '../../components/swiperNavBar.vue';
	import countdown from '@/components/xianshidingshiqi/cz-countdown.vue';
	import cuCustom from './components/cu-custom.vue'
	import {
		mapState
	} from 'vuex';
	export default {
		data() {
			return {
				CustomBar: this.CustomBar,
				StatusBar: this.StatusBar,
				maxHeight: 285,
				showCustom: false,
				fenleilisr: [],
				fenleishujulist: [], //分类数据
				tuijiannList: [], //推荐数据
				tuijianShow: true, //推荐展示
				yifengouList: [], //一分购数据
				yifengouchangdu: 3, //一分购长度

				xianshimiaochangdu: 3, //限时长度
				xianshimiaoList: [], //限时秒杀数据
				newTimesContent: "", //通知
				categoryButtomList: [], //分类
				t5: {}, //活动弹框
				ismask: false,
				carouselList: [], //轮播图
				storage: false, //默认设置为不展示jmc
				district: '你的位置',
				loaded: false, //是否已加载过
				tongzhishow: false,
				startTime: '2021-02-18 00:00:00',
				enTime: '2021-02-18 23:59:59',


				background: ['color1', 'color2', 'color3'],
				indicatorDots: true,
				autoplay: true,
				interval: 2000,
				duration: 500,

				navbarTop: 26,
				navHeight: 32,
				navBottom: 58,
				MT: 38,
				MT2: 20,
				statusHeight: 20,
				storage: false, //默认设置为不展示jmc
				//导航
				scrollIntoView: 0, //设置哪个方向可滚动，则在哪个方向滚动到该元素
				swiperTabList: ['推荐货品'], //导航列表
				swiperTabIdx: 0,
				swiperCurrentSize: '28rpx', //导航的字体大小
				swiperColor: '#666666', //导航栏字体未选中前颜色
				swiperCurrentColor: '#24C600', //选中当前导航栏字体颜色
				currentSwiperWidth: '25%', //当前导航的宽度 % upx rpx px  （导航超出可左右滑动 ）
				currentSwiperHeight: 80, //当前导航的高度度 rpx px
				mainHeight: 200, //全屏或者局部滑动设置的高度
				currentSwiperLineShow: true, //是否显示导航栏的线条 （线条距离标题太近的话可自行修改.swiperLine的css）
				currentSwiperLineActiveBg: '#24C600', //当前选中的导航栏线条颜色
				currentSwiperLineActiveWidth: '40rpx', //当前选中的导航栏线条的宽度 upx rpx px
				currentSwiperLineActiveHeight: '6rpx', //当前选中的导航栏线条的高度度 upx rpx px
				currentSwiperLineAnimatie: 300, //当前选中的导航栏线条过渡效果

				//（全屏出现滚动条 去掉paddingTop 但导航栏会遮住部分内容 自行改.swiperCont .swiper里css）
				//也可获取导航栏的高度  屏幕高度减去导航栏高度 = 你的内容全屏高度  不会出现滚动条
				shopList: [{
						status: 0
					},
					{
						status: 1
					},
					{
						status: 0
					},
					{
						status: 0
					},
					{
						status: 1
					},
					{
						status: 1
					},
					{
						status: 1
					}
				],
				bgc: '../../static/gerebBj.png',
				showAll: true
			};
		},
		computed: {
			...mapState(['hasLogin', 'userInfo'])
		},
		onReachBottom() {
		
		},
		onPageScroll(e) {
			const {
				maxHeight
			} = this
			this.showCustom = e.scrollTop >= maxHeight
		},
		onReady() {
			const query = uni.createSelectorQuery().in(this);
			query.select('#head').boundingClientRect(data => {
				// this.maxHeight = data.height 
				this.maxHeight = 120
				console.log('this.maxHeight', this.maxHeight)
			}).exec();
			const res = uni.getSystemInfoSync();
			// console.log(res.statusBarHeight);
			this.statusHeight = res.statusBarHeight;
			// #ifdef MP-WEIXIN
			// console.log('状态栏高度');
			console.log(this.statusHeight + 'px');
			this.navbarTop = wx.getMenuButtonBoundingClientRect().top;
			this.navHeight = wx.getMenuButtonBoundingClientRect().height;
			// console.log('标题栏高度');
			console.log(this.navHeight + 'px');
			this.navBottom = wx.getMenuButtonBoundingClientRect().bottom;
			// console.log('底部坐标');
			console.log(this.navBottom + 'px');
			this.MT = this.navBottom;
			// #endif
		
		},
		components: {
			swiperNavBar,
			countdown,
			missing,
			cuCustom
		},
		async onLoad(options) {
			console.log('首次进入')
			var that = this;
			uni.getLocation({
				type: 'wgs84',
				success(res) {
					console.log('你当前经纬度是：');
					console.log(res);
					let latitude, longitude;
					latitude = res.latitude.toString();
					longitude = res.longitude.toString();
					that.dangqiandizhi = '请选择位置';
					that.$api
						.request(
							'user',
							'getAddressStr', {
								lg: longitude,
								lat: latitude
							},
							failres => {
								that.dangqiandizhi = '获取位置失败';
								that.$api.msg('111111',failres.errmsg);
							}
						)
						.then(res => {
							that.dangqiandizhi = res.data.result.address;
						});
				}
			});

			//#ifdef H5
			//H5进入，有可能是回调进来的
			if (options.code && options.state) {
				const that = this;
				that.logining = true;
				that.$api
					.request(
						'user',
						'thirdPartLogin', {
							loginType: 3,
							raw: options.code
						},
						failres => {
							that.logining = false;
							that.$api.msg(failres.errmsg);
						}
					)
					.then(res => {
						//登录成功，重定向到指定目标2
						that.logining = false;
						that.$store.commit('login', res.data);
						uni.setStorageSync('userInfo', res.data);
						//重定向到
						//不能重定向到tabbar页面
						if (
							options.state === '/pages/cart/cart' ||
							options.state === '/pages/user/user' ||
							options.state === '/pages/index/index' ||
							options.state === '/pages/category/category'
						) {
							uni.switchTab({
								url: options.state
							});
						} else {
							uni.redirectTo({
								url: options.state
							});
						}
					});
			}
			//#endif
			this.$api
				.request('advertisement', 'getActiveAd', {
					adType: 6
				})
				.then(res => {
					this.indexBanner = res.data[0];
				});
			var test = await uni.getLocation({
				type: 'wgs84'
			});
			console.log("test=============",test)
			var [err, res1] = test
			debugger

			if (res1.errMsg === 'getLocation:ok') {
				uni.showLoading({
					title: '加载中...'
				});
				this.$api
					.request(
						'position',
						'getStorageList', {
							// lng: res1.longitude,
							// lat: res1.latitude
						},
						failres => {
							uni.hideLoading();
							uni.showToast({
								icon: 'none',
								mask: true,
								title: '数据加载失败'
							});
						}
					)
					.then(res => {
						uni.hideLoading();
						res.data = res.data.map(item => {
							return { ...item,
								distance: ''
							};
						});
						for (let i in res.data) {
							console.log(i, 'test');
							let distance = that.getDistance(res1.latitude, res1.longitude, res.data[i].latitude, res.data[i].longitude);
							res.data[i].distance = distance;
						}

						let maxDistance = res.data.reduce((prev, cur) => {
							return prev.distance > cur.distance ? cur : prev;
						});

						//是否在配送范围内
						let id = '';
						// if (maxDistance.distance < 5) {
						// 	//是否在3公里内
						// 	id = maxDistance.id;
						// 	that.district = that.dangqiandizhi;
						// 	that.storage = true;
						// 	that.loadData(maxDistance.id);
						// }
						// 不判断配送范围
						id = maxDistance.id;
						that.district = that.dangqiandizhi;
						that.storage = true;
						that.loadData(maxDistance.id);



						that.$store.commit('setStorage', id);
						that.getyifengou()
						that.getxianshi()
						that.loaded = true;

						var timer1 = setTimeout(function() {
							if (id) {

								that.district = that.dangqiandizhi;
								that.storage = true;
							} else {

								that.district = that.dangqiandizhi;
								that.storage = false;
							}
						}, 1000);
					});
			}
			console.log('结束');


			//#ifdef MP-WEIXIN

			//#endif
		},
		onShow() {
			console.log('gaodu-----------', this.CustomBar - this.StatusBar)
			console.log('CustomBar-----------', this.CustomBar)
			console.log('StatusBar-----------', this.StatusBar)
			this.getmiaoshatime()
			this.tongzhishow = false
			if (this.loaded) {
				this.$store.state.storageId ? (this.storage = true) : (this.storage = false);
				if (this.$store.state.storageId && this.categoryButtomList.length == 0) {
					this.loadData(this.$store.state.storageId);
					this.getxianshi()
					this.getyifengou()
					
				}
			}
			if (uni.getStorageSync('userInfo') == '') {
				uni.hideShareMenu()
			} else {
				uni.showShareMenu()
			}
		},
		onShareAppMessage(res) {
			if (res.from === 'button') { // 来自页面内分享按钮
				console.log(res.target)
			}
			return {
				title: `你的好友${this.userInfo.nickname}在涞了么平台邀您一起抢购超值商品`,
				path: '/pages/index/indexs',
				imageUrl: "https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/63b7882a2c4947d48bc5394acc7992f5.png"
			}
		},
		methods: {
			coupon() {
				let url = ''
				if (!this.hasLogin) {
					url = '/pages/public/login';
				} else {
					url = '/pagesA/PanicBuying/PanicBuying'
				}
				uni.navigateTo({
					url
				});
			},
			//商品详情
			navToDetail(id) {
				uni.navigateTo({
					url: `../product/detail?id=${id}`
				})
			},
			//今日必买
			navTotuijian(id) {
				uni.navigateTo({
					url: `../tuijian/tuijian?id=${id}`
				});

			},
			//获取当前时间
			getmiaoshatime() {
				var myDate = new Date();
				var nian = myDate.getFullYear(); //获取完整的年份(4位,1970-????)
				var yue = myDate.getMonth() + 1; //获取当前月份(0-11,0代表1月)
				if (yue < 9) {
					yue = '0' + yue
				}
				var ri = myDate.getDate(); //获取当前日(1-31)
				if (ri < 9) {
					ri = '0' + ri
				}
				var shi = myDate.getHours(); //获取当前小时数(0-23)
				if (shi < 9) {
					shi = '0' + shi
				}
				var fen = myDate.getMinutes(); //获取当前分钟数(0-59)
				if (fen < 9) {
					fen = '0' + fen
				}
				var miao = myDate.getSeconds(); //获取当前秒数(0-59)
				if (miao < 9) {
					miao = '0' + miao
				}
				this.startTime = nian + '-' + yue + '-' + ri + ' ' + shi + ':' + fen + ':' + miao
				this.enTime = nian + '-' + yue + '-' + ri + ' 23:59:59'
				console.log('this.startTime', this.startTime)
				console.log('this.enTime', this.enTime)

			},
			//通知点击
			tongzhiBtn() {
				console.log('1111')
				this.tongzhishow = false
			},
			// 子组件内部触发事件对应回调handle
			handle(val) {
				this.valueChild = val;
				console.log('时间结束');
				this.loadData('refresh');
				if (val == '时间结束') {
					this.daojishidis = false;
				}
			},
			//tab点击事件 自行完善需要的代码
			CurrentTab: function(index, item) {
				this.swiperTabIdx = index;
				this.scrollIntoView = Math.max(0, index - 1);
				console.log(index + '--0--' + item);
				if (item == '推荐货品') {
					this.tuijianShow = true
				} else {
					this.tuijianShow = false
					for (var i = 0; this.fenleishujulist.length; i++) {
						if (item == this.fenleishujulist[i].title) {
							this.getfenleia(this.fenleishujulist[i].url)
						}
					}
				}

			},
			//滑动事件  自行完善需要的代码
			SwiperChange: function(e) {
				//console.log(e)
				//console.log(e.detail)
				//console.log(e.detail.current);
				this.swiperTabIdx = e.detail.current;
				this.scrollIntoView = Math.max(0, e.detail.current - 1);
			},
			//选择地址
			chooseLocation() {
				let that = this;
				uni.chooseLocation({
					success: res1 => {
						console.log(res1);
						if (res1.name === '') {
							return;
						}
						this.district = res1.name;
						uni.showLoading({
							title: '加载中...'
						});

						this.$api
							.request(
								'position',
								'getStorageList', {
									// lng: res1.longitude,
									// lat: res1.latitude
								},
								failres => {
									uni.hideLoading();
									uni.showToast({
										icon: 'none',
										mask: true,
										title: '数据加载失败'
									});
								}
							)
							.then(res => {
								uni.hideLoading();
								res.data = res.data.map(item => {
									return { ...item,
										distance: ''
									};
								});
								for (let i in res.data) {
									console.log(i, 'test');
									let distance = that.getDistance(res1.latitude, res1.longitude, res.data[i].latitude, res.data[i].longitude);
									res.data[i].distance = distance;
								}

								let maxDistance = res.data.reduce((prev, cur) => {
									return prev.distance > cur.distance ? cur : prev;
								});
								console.log(maxDistance, 1235665);
								let id;
								if (maxDistance.distance < 5) {
									id = maxDistance.id;
								}

								this.loaded = true;
								uni.hideLoading();
								this.newTop = [];
								this.cheapRecommend = [];
								this.salesTop = [];
								console.log('maxDistance.id', id);
								this.loadData(id);

								this.$store.commit('setStorage', id);
								this.getxianshi()
								this.getyifengou()
								if (!id) {
									this.storage = false;
								} else {
									this.storage = true;
								}
							});
					}
				});
			},
			//获取仓库数据
			async loadData(id) {
				console.log('jinlaiid', id);
				const that = this;
				if (id == undefined) {
					this.ismask = false;
				}

				if (!id) {
					id = 0;
				}

				uni.setStorageSync('LoadData', id);
				uni.showLoading({
					title: '加载中...'
				});
				that.$api
					.request(
						'integral',
						'getIndexDataByStorage', {
							storageId: id
						},
						failres => {
							that.$api.msg(failres.errmsg);
							uni.hideLoading();
						}
					)
					.then(res => {
						console.log(res, '000000000000000');
						let data = res.data;
						//橱窗
						that.windowSpuList = data.windowRecommend;
						//轮播
						data.advertisement.t1.forEach(item => {
							if (!item.color) {
								item.color = 'rgb(205, 215, 218)';
							}
						});

						that.carouselList = data.advertisement.t1;

						that.shareInfo = data.advertisement.t11;
						that.swiperLength = data.advertisement.t1.length;
						that.titleNViewBackground = data.advertisement.t1[0].color;
						if (data.cheapRecommend) {
							that.cheapRecommend = data.cheapRecommend;
						}

						//弹窗
						if (data.advertisement.t5.length > 0) {
							that.t5 = data.advertisement.t5[0];
							console.log('弹窗', that.t5)
							if (id) {
								console.log('test tan');
								this.ismask = true;
							}
						}

						this.newTimesContent = data.newTimesContent;

						//分类精选
						if (data.advertisement.t2) {
							that.categoryPickList = data.advertisement.t2;
						}
						//横幅
						if (data.advertisement.t3 && data.advertisement.t3.length > 0) {
							that.banner = data.advertisement.t3[0];
						}
						//热销
						if (data.salesTop) {
							that.salesTop = data.salesTop;
							this.pageNo = 2;
						}
						//分类5Buttom
						if (data.advertisement.t4) {
							console.log(data.advertisement.t4, 'test777777');
							that.categoryButtomList = data.advertisement.t4;
							console.log('分类', that.categoryButtomList)


							uni.setStorageSync('categoryButtomList', that.categoryButtomList);
						}
						//推荐货品
						if (data.infoTop) {
							this.tuijiannList = data.infoTop
							console.log('推荐货品', this.tuijiannList)
						}
						//分类数据
						if (data.footButton) {

							for (var i = 0; i < data.footButton.length; i++) {
								this.swiperTabList.push(data.footButton[i].title)
								this.fenleishujulist.push({
									title: data.footButton[i].title,
									url: data.footButton[i].url
								})
							}
							console.log('分类数据', this.fenleishujulist)
						}
						uni.hideLoading();
					})
					.catch(err => {
						uni.hideLoading();
						console.log('请求失败，请稍后再试', err);
						this.$api.msg('请求失败，请稍后再试');
					});
			},
			getDistance(lat1, lng1, lat2, lng2) {
				var radLat1 = this.Rad(lat1);
				var radLat2 = this.Rad(lat2);
				var a = radLat1 - radLat2;
				var b = this.Rad(lng1) - this.Rad(lng2);
				var s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + Math.cos(radLat1) * Math.cos(radLat2) * Math.pow(
					Math.sin(b / 2), 2)));
				s = s * 6378.137; // EARTH_RADIUS;
				s = Math.round(s * 10000) / 10000; //输出为公里
				//s=s.toFixed(4);
				return s;
			},
			Rad(d) {
				return (d * Math.PI) / 180.0;
			},
			//进入活动页
			naviageToPage(page, title) {
				const that = this;
				this.ismask = false;
				if (title) {
					uni.navigateTo({
						url: page
					});

					// uni.navigateTo({
					// 	url: "/pagesA/qiandao/qiandaoyei"
					// });
					console.log(page, 'jinlai');
				} else {
					if (page == '/pages/user/chengweiTZ') {
						// console.log(123);
						let that = this;
						let obj = {};
						obj.userId = uni.getStorageSync('userInfo').id;
						that.$api
							.request('user', 'getUserInfo', obj, failres => {
								that.$api.msg(failres.errmsg);
								uni.hideLoading();
							})
							.then(res => {
								if (res.errno == '200') {
									if (res.data) {
										console.log(res.data.isChief);
										if (res.data.isChief == -1) {
											uni.navigateTo({
												url: page
											});
										} else {
											uni.showToast({
												title: '您已成为团长或正在审核',

												icon: 'none'
											});
										}
									}
								}
							});
						return;
					}

					console.log(page);
					uni.navigateTo({
						url: page
					});
				}
			},
			//获取限时秒杀数据
			getxianshi() {
				var that = this
				var obj = {}
				obj.pageSize = 1000,
					obj.pageNo = 1,
					obj.storageId = this.$store.state.storageId,
					this.$api
					.request('groupshop', 'getGroupShopPage', obj, failres => {
						that.$api.msg(failres.errmsg);
						uni.hideLoading();
					})
					.then(res => {

						if (res.errno == '200') {
							that.xianshimiaoList = res.data.items
							that.xianshimiaochangdu = that.xianshimiaoList.length
						}
					});
			},
			//获取一分购数据
			getyifengou() {
				var that = this
				var obj = {}
				obj.activityType = 2,
					obj.pageNo = 1,
					obj.storageId = this.$store.state.storageId,
					this.$api
					.request('activity', 'activityGoodsList', obj, failres => {
						that.$api.msg(failres.errmsg);
						uni.hideLoading();
					})
					.then(res => {
						console.log(res)
						if (res.errno == '200') {
							that.yifengouList = res.data
							that.yifengouchangdu = that.yifengouList.length
						}
					});
			},
			//加入购物车
			jiarugwBtn(item) {
				console.log('加入购物车', item)
				if (item.stock == 0) {
					uni.showToast({
						icon: 'none',
						mask: true,
						title: '库存补充中'
					});
					return
				}
				const that = this
				that.$api.request('cart', 'addCartItem', {
					skuId: item.skuId,
					// activityId: that.tlist[index].skuDto.activityId,
					// couponId: that.tlist[index].skuDto.couponId,
					num: 1
				}).then(res => {
					that.$api.msg('添加购物车成功')
					// var cartNum = this.$store.state.cartNum + 1
					// that.$store.commit('addCart', cartNum)
					that.countTabNum()

				})
			},
			//获取购物车数量
			countTabNum() {
				debugger
				this.$api.request('cart', 'countCart').then(res => {
					if (res.data > 0) {
						uni.setTabBarBadge({
							index: 2,
							text: res.data + ''
						})
					} else if (res.data <= 0) {
						uni.removeTabBarBadge({
							index: 2
						})
					}
					this.$store.commit('addCart', res.data)
				}).catch(err => {
					// this.$api.msg('请求失败，请稍后再试')
				})
			},
			//获取分类数据
			getfenleia(id) {
				uni.showLoading({
					title: '加载中...'
				});
				var obj = {}
				obj.storageId = this.$store.state.storageId
				obj.recommendType = id
				obj.pageNo = 1
				this.$api.request('recommend', 'getRecommendByStorage', obj).then(res => {
					uni.hideLoading();
					this.fenleilisr = res.data.items
					console.log('获取分类数据', this.fenleilisr)
				}).catch(err => {
					uni.hideLoading();
					// this.$api.msg('请求失败，请稍后再试')
				})
			},
			goManjian() {
				console.log(this.t5)
				const {
					url
				} = this.t5
				this.ismask = false
				if (url === '/pages/index/indexs') {
					return
				} else {
					if (['/pages/category/category', '/pages/cart/cart', '/pages/user/user']) {
						uni.switchTab({
							url
						})
					} else {
						uni.navigateTo({
							url
						})
					}
				}
			},
			//猜你喜欢
			cainixihbTn(item) {
				console.log('猜你喜欢', item)

				uni.setStorage({
					key: "currentId",
					data: item.id
				})

				uni.switchTab({
					url: '/pages/category/category'
				});
			},

		}
	};
</script>

<style lang="scss">
	page {
		width: 100%;
		height: 100%;
		background-color: #F1F1F1;
	}

	.gudingdinwei {
		z-index: 99;
		background-color: red;

		width: 100rpx;

	}

	.Bigmask {
		width: 100%;
		height: 100vh;
		background-color: rgba(0, 0, 0, 0.3);
		position: fixed;
		top: 0;
		left: 0;
		z-index: 1000;
		transition: all 0.5s;
	}

	.maskBox {
		width: 580rpx;
		height: 780rpx;
		position: fixed;
		top: 50%;
		left: 50%;
		z-index: 1001;
		transform: translateX(-50%) translateY(-50%) scale(1, 1);
		transition: all 0.5s ease;

		.maskClose {
			position: absolute;
			right: 15px;
			// top: 15px;
			left: 50%;
			transform: translateX(-50%);
			bottom: -85rpx;

			width: 26px;
			height: 26px;
		}

		.mask {
			width: 100%;
			height: 100%;
		}
	}

	.op {
		opacity: 0;
		visibility: hidden;
	}

	.opAc {
		visibility: visible;
		opacity: 1;
	}

	.sc {
		opacity: 0;
		transform: translateX(-50%) translateY(-50%) scale(0, 0);
		transition: all 0.5s ease;
	}

	.scAc {
		opacity: 1;
		transform: translateX(-50%) translateY(-50%) scale(1, 1);
		transition: all 0.5s ease;
	}


	.guanggao {
		width: 750rpx;
		height: 63rpx;
		background: #FFFFFF;
		opacity: 0.5;
		display: flex;
		align-items: center;
		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #000000;
		opacity: 0.5;
		justify-content: center;
		position: absolute;
		top: 236rpx;
		left: 0rpx;

		.guanggao-img {
			position: absolute;
			top: 21rpx;
			right: 21rpx;
			width: 23rpx;
			height: 23rpx;
		}
	}

	.tubiaoqu {
		width: 100rpx;
		position: absolute;
		display: flex;
		align-items: center;
	}

	.weizhiquyu {
		width: 750rpx;
		height: 60rpx;
		display: flex;
		align-items: center;
		justify-content: space-around;
		position: absolute;
		// top: 170rpx;
		left: 0rpx;
	}

	.head {
		height: 570rpx;
		width: 100%;
		// background-color: red;
		position: relative;

		.swiper {
			width: 100%;
			height: 100%;

			.swiper-item {
				width: 100%;
				height: 100%;

				image {
					width: 100%;
					height: 100%;
				}
			}
		}
	}

	.mat {
		padding: 0 30rpx;
		box-sizing: border-box;

		image {
			width: 28rpx;
			height: 38rpx;
			margin-right: 10rpx;
		}

		font-size: 30rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #ffffff;

		.bme {
			width: 200rpx;
			// height: 100%;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
		}

		.seach {
			flex: 1;
			height: 100%;
			background-color: #ffffff;
			border-radius: 999rpx;
			display: flex;
			align-items: center;
			justify-content: center;
			font-size: 24rpx;
			color: #000000;
			opacity: 0.7;

			image {
				width: 28rpx;
				height: 29rpx;
			}

			input {
				width: 150rpx;
			}
		}

		.tad {
			width: 50rpx;
			height: 50rpx;

			image {
				margin-left: 20rpx;
				width: 50rpx;
				height: 50rpx;
			}
		}
	}

	.mengde {
		background-color: #ffffff;
		opacity: 0.5;

		font-size: 24rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #3c6b41;

		font-size: 26rpx;
		padding: 20rpx;
		box-sizing: border-box;

		image {
			width: 23rpx;
			height: 23rpx;
		}

		.mad {
			flex: 1;

			color: #3c6b41;
			text-align: center;
		}
	}

	.list {
		width: 100%;
		display: flex;
		align-items: center;
		justify-content: space-around;
		flex-wrap: wrap;

		// padding: 0 30rpx;
		.listitem {
			width: 18%;
			margin-bottom: 20rpx;
			text-align: center;
			font-size: 26rpx;

			image {
				width: 111rpx;
				height: 110rpx;
				// border-radius: 12rpx;
			}

			.md {
				width: 100%;
				font-size: 26rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #000000;
			}
		}
	}

	/* 新鲜时报 */
	.bao {
		display: flex;
		align-items: center;
		background-color: #b5eeba;
		margin-top: 26rpx;
		width: 100%;
		overflow: hidden;

		image {
			width: 178rpx;
			height: 60rpx;
		}
	}

	.newtimes {
		font-size: 26rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #3c6b41;
		overflow: hidden;
		white-space: nowrap;
		box-sizing: border-box;
		animation: marquee 15s linear infinite;
	}

	@keyframes marquee {
		0% {
			-webkit-transform: translateX(184rpx);
		}

		100% {
			-webkit-transform: translateX(-100%);
		}
	}

	.xianshimiaosha {
		width: 710rpx;
		height: 440rpx;
		margin-left: 20rpx;
		background: url(../../static/xintupian/xianshimiao.png);
		background-size: 100% 100%;

		.xianshishangpin {
			width: 690rpx;
			height: 340rpx;
			background: #FFFFFF;
			border-radius: 14rpx;
			margin-left: 11rpx;
			overflow-y: hidden;
			overflow-x: auto;

			.xianshishangpindiv {
				height: 310rpx;

				.xianshijiaru {
					display: inline-block;
					width: 180rpx;
					height: 310rpx;
					margin-left: 20rpx;

					.xinshijiargwc {
						width: 176rpx;
						height: 45rpx;
						background: linear-gradient(90deg, #FC8A4D 0%, #FB5A29 100%);
						border-radius: 23rpx;
						font-size: 22rpx;
						font-family: PingFang SC;
						// font-weight: bold;
						color: #FEFEFE;
						display: flex;
						// align-items: center;
						justify-content: center;
						margin-top: 10rpx;
					}

					.xianjiage {
						width: 176rpx;
						margin-top: 5rpx;
						display: flex;
						align-items: center;
						justify-content: center;

						.yuanjiage {
							font-size: 20rpx;
							font-family: PingFang SC;
							text-decoration: line-through;
							color: #B0B0B0;
							margin-left: 5rpx;
						}

						.goumaijiage {
							font-size: 32rpx;
							font-family: PingFang SC;
							font-weight: bold;
							color: #FB5928;
						}
					}

					.xianshengname {
						width: 176rpx;
						font-size: 25rpx;
						margin-top: 5rpx;
						font-family: PingFang SC;
						font-weight: bold;
						color: #1C1C1C;
						overflow: hidden; //超出的文本隐藏
						text-overflow: ellipsis; //溢出用省略号显示
						white-space: nowrap; //溢出不换行
					}

					.sptupian {
						width: 180rpx;
						height: 180rpx;
						position: relative;

						.dingweiimg {
							width: 180rpx;
							height: 51rpx;
							position: absolute;
							left: 0;
							bottom: 0;
						}

						.sptupianimg {
							width: 180rpx;
							height: 180rpx;
							border-radius: 10rpx;
						}

					}
				}


			}
		}

		.xianshimiaoshatop {
			height: 87rpx;
			width: 670rpx;
			margin-left: 20rpx;
			display: flex;
			align-items: center;

			.xianshiallyi {
				width: 166rpx;
				height: 50rpx;
				margin-left: 30rpx;
			}

			.xianshiall {
				width: 166rpx;
				height: 50rpx;
				margin-left: 24rpx;
			}

			.xianshitimeyi {
				height: 50rpx;
				width: 284rpx;
				display: flex;
				align-items: center;

				// background-color: #C0C4CC;
				.tupoian {
					height: 33rpx;
					width: 284rpx;
					margin-top: 10rpx;
				}
			}

			.xianshitime {
				height: 51rpx;
				width: 284rpx;
				display: flex;
				align-items: center;

				// background-color: #C0C4CC;
				.tupoian {
					width: 284rpx;
					height: 33rpx;
				}

			}

			.xianshixian {
				width: 2rpx;
				height: 42rpx;
				background: #F9FAF4;
				margin-left: 11rpx;
				margin-right: 11rpx;
			}

			.xianshitupian {
				width: 170rpx;
				height: 48rpx;
			}
		}
	}

	.swipeMian {
		.swiperMain {
			width: 100%;

		}

		.cainixinhuan {
			width: 690rpx;
			background: #FFFFFF;
			border-radius: 10rpx;
			margin-left: 30rpx;
			margin-bottom: 20rpx;
			padding-bottom: 10rpx;

			.cainixinhuansj {
				width: 100%;
				// height: 62rpx;
				margin-bottom: 20rpx;
				display: flex;
				align-items: center;
				flex-wrap: wrap;

				.cainixinhuansjdiv {
					width: 300rpx;
					height: 62rpx;
					background: #F1F1F1;
					border-radius: 31rpx;
					margin-left: 30rpx;
					display: flex;
					align-items: center;
					margin-top: 18rpx;

					.imgurl {
						width: 48rpx;
						height: 48rpx;
						border-radius: 50%;
						margin-left: 20rpx;
					}

					.xinxiansg {

						font-size: 26rpx;
						font-family: PingFang SC;
						font-weight: 500;
						color: #191919;
						margin-left: 26rpx;
					}

					.jiantou {
						width: 14rpx;
						height: 21rpx;
						margin-left: 50rpx;
					}
				}
			}

			.cainixinhuanTop {
				height: 70rpx;
				font-size: 26rpx;
				font-family: PingFang SC;
				font-weight: 500;
				color: #191919;
				display: flex;
				align-items: center;
				margin-left: 20rpx;
			}
		}

		.fujinlinju {
			width: 690rpx;
			height: 292rpx;
			background: url('https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/624fa1d8dbcb441f8d97989cf784cbaf.png');
			background-size: 100% 100%;
			margin-left: 30rpx;
			margin-bottom: 20rpx;



			.fujinlinjubom {
				width: 658rpx;
				height: 214rpx;
				background: #FFFFFF;
				border-radius: 10rpx;
				margin-left: 16rpx;
				overflow-y: hidden;
				overflow-x: auto;

				.fujinlinjubomdiv {
					height: 190rpx;
					overflow: hidden;

					.fujianshangpin {
						display: inline-block;
						width: 135rpx;
						height: 190rpx;
						margin-left: 22rpx;

						.shangjiage {
							text-align: center;
							font-size: 27rpx;
							font-family: PingFang SC;
							font-weight: 500;
							color: #FE0000;
						}

						.imgname {
							width: 135rpx;
							height: 142rpx;
							border-radius: 10rpx;
						}
					}

				}
			}

			.fujinlinjutop {
				height: 62rpx;
				width: 658rpx;
				margin-left: 16rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;

				.fujinlinjutopright {
					display: flex;
					align-items: center;

					.allimg {
						width: 8rpx;
						height: 12rpx;
						margin-left: 9rpx;
						margin-right: 9rpx;
					}

					.chkanquanbu {
						font-size: 20rpx;
						font-family: PingFang SC;
						font-weight: 400;
						color: #FFFFFF;
					}
				}

				.fujinlinjutopleft {
					display: flex;
					align-items: center;

					.diandian {
						width: 4rpx;
						height: 4rpx;
						background: #F9FAF4;
						border-radius: 50%;
						margin-left: 9rpx;
						margin-right: 9rpx;
					}

					.fenfenz {
						font-size: 20rpx;
						font-family: PingFang SC;
						font-weight: 400;
						color: #FFFFFF;
					}

					.douzainame {

						font-size: 26rpx;
						font-family: PingFang SC;
						font-weight: bold;
						color: #FFFFFF;
					}
				}
			}
		}

		.shangpinneirong {
			width: 690rpx;
			height: 250rpx;
			background: #FFFFFF;
			border-radius: 10rpx;
			margin-left: 30rpx;
			margin-bottom: 20rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.shangpinjiaru {
				width: 420rpx;
				height: 210rpx;
				margin-right: 20rpx;

				.shangpinjianjie {
					width: 415rpx;
					font-size: 24rpx;
					font-family: PingFang SC;
					font-weight: 400;
					color: #ABABAB;
					margin-top: 5rpx;
					overflow: hidden;
					display: -webkit-box; //将对象作为弹性伸缩盒子模型显示。
					-webkit-box-orient: vertical; //从上到下垂直排列子元素（设置伸缩盒子的子元素排列方式）
					-webkit-line-clamp: 1; //这个属性不是css的规范属性，需要组合上面两个属性，表示显示的行数
				}

				.shangpinjiarub {
					width: 415rpx;
					height: 45rpx;
					margin-top: 51rpx;
					display: flex;
					justify-content: space-between;

					.shangpinjiarubright {
						width: 188rpx;
						height: 52rpx;

						background: #36B542;
						border-radius: 26rpx;
						font-size: 28rpx;
						font-family: PingFangSC-Medium, PingFang SC;
						font-weight: bold;
						color: #FEFEFE;
						display: flex;
						justify-content: center;
					}

					.shangpinjiarubleft {
						.shangpingq {
							margin-left: 7rpx;
							font-size: 20rpx;
							font-family: PingFang SC;
							font-weight: 400;
							text-decoration: line-through;
							color: #ABABAB;
						}

						.shangpxianz {
							font-size: 36rpx;
							font-family: PingFang SC;
							font-weight: 600;
							color: #FE0000;
						}
					}
				}

				.shangpinname {
					width: 415rpx;
					height: 75rpx;
					font-size: 30rpx;
					font-family: PingFang SC;
					font-weight: bold;
					color: #383838;
					overflow: hidden;
					display: -webkit-box; //将对象作为弹性伸缩盒子模型显示。
					-webkit-box-orient: vertical; //从上到下垂直排列子元素（设置伸缩盒子的子元素排列方式）
					-webkit-line-clamp: 2; //这个属性不是css的规范属性，需要组合上面两个属性，表示显示的行数
				}
			}

			.shangpintupian {
				width: 210rpx;
				height: 210rpx;
				border-radius: 10rpx;
				background-color: #C0C4CC;
				margin-left: 20rpx;
				overflow: hidden;
				position: relative;

				.mengcheng {
					width: 210rpx;
					height: 210rpx;
					position: absolute;
					left: 0;
					top: 0;
				}

				.imgdaxiao {
					width: 210rpx;
					height: 210rpx;
				}
			}
		}

		.swiperHead {
			position: sticky !important;
			z-index: 999;
			width: 100%;
			background: #FFFFFF;

		}

		.swiperHead scroll-view {
			display: flex;
			flex-direction: row;
			flex-wrap: nowrap;
			white-space: nowrap;
		}

		.swiperTab {
			display: inline-flex;
			flex-direction: column;
			text-align: center;
		}

		.swiperCont {
			width: 100%;
			padding-top: 50rpx;

			.shopList {
				padding: 0 40rpx;
				box-sizing: border-box;
				width: 100%;
				display: flex;
				// justify-content: space-around;
				justify-content: space-between;
				flex-wrap: wrap;

				.shopitem {
					width: 45%;
					height: 500rpx;
					border-radius: 10rpx;
					background-color: #ffffff;
					margin-bottom: 40rpx;

					.shopOne {
						width: 100%;
						height: 100%;
						padding: 5rpx;
						box-sizing: border-box;

						image {
							width: 100%;
							height: 276rpx;
							margin-top: 40rpx;
						}

						.wenben {
							width: 90%;
							margin: 0 auto;
							overflow: hidden;
							text-overflow: ellipsis;
							white-space: nowrap;
							// background-color: red;
							font-size: 32rpx;
							font-family: PingFang SC;
							font-weight: bold;
							color: #000000;

							text {
								font-size: 26rpx;
								font-family: PingFang SC;
								font-weight: bold;
								color: #000000;
								margin-left: 10rpx;
							}
						}

						.bote {
							width: 90%;
							// background-color: red;
							margin: 0 auto;
							display: flex;
							justify-content: space-between;
							align-items: center;
							color: red;
							font-size: 38rpx;
							font-family: PingFang SC;
							font-weight: 500;

							.bat {

								// height: 100%;
								// background-color: red;
								text {
									font-size: 24rpx;
								}
							}

							image {
								margin-top: 0;
								width: 56rpx;
								height: 56rpx;
							}
						}

						// background-color: red;
					}

					.shopTwo {
						border-radius: 10rpx;
						width: 100%;
						height: 100%;
						padding: 10rpx;
						box-sizing: border-box;

						.title {
							font-size: 34rpx;
							font-family: HYRuiZhi;
							font-weight: bold;
							color: #ffffff;
						}

						.txt {
							margin-top: 10rpx;
							font-size: 22rpx;
							font-family: PingFang SC;
							font-weight: 400;
							color: #ffffff;
						}

						.box {
							margin-top: 10rpx;
							padding: 40rpx;
							box-sizing: border-box;
							border-radius: 20rpx;
							width: 100%;
							height: 380rpx;
							background-color: #ffffff;

							.boxOne {
								width: 100%;
								height: 30%;
								display: flex;
								align-content: center;
								margin-bottom: 20rpx;

								.imageBox {
									position: relative;
									width: 80rpx;
									height: 80rpx;
									margin-right: 10rpx;

									image {
										width: 100%;
										height: 100%;
									}

									.ding {
										position: absolute;
										top: -25%;
										left: -25%;
										width: 38rpx;
										height: 38rpx;

										image {
											width: 38rpx;
											height: 38rpx;
										}
									}
								}
							}
						}
					}
				}
			}
		}

		/* #ifdef H5 */
		// .swiperHead {
		// 	position: fixed;
		// 	top: 44px;
		// 	z-index: 10;
		// 	width: 100%;
		// 	background: #ffffff;
		// }
		/* #endif */

		.swiper {
			width: 100%;
			// height: 400rpx;
		}

		.swiperItem {
			// height: 400rpx;
			// line-height: 400rpx;
			overflow: auto;
			background: #00b26a;
			text-align: center;
			color: #ffffff;
			font-size: 30upx;
		}

		.swiperItem image {
			width: 100%;
			height: 100%;
			display: block;
		}
	}

	.kuanghuan {
		margin: 30rpx auto;
		padding: 0 30rpx;
		padding-top: 300rpx;
		width: 720rpx;
		height: 500rpx;
		background: url(https://laileme123.oss-cn-shanghai.aliyuncs.com/bg/68c7cab84e3545e68a0423d6ec3c176f.png) no-repeat center;
		background-size: 100% 100%;


		.lisya {
			width: 100%;
			// height: 100rpx;
			// background-color: red;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.lisyaItem {
				width: 20%;
				// background-color: red;
				// height: 150rpx;
				text-align: center;
				box-sizing: border-box;

				image {
					// position: relative;
					// top: -20%;
					// margin: 0 auto;
					width: 90%;
					height: 81rpx;
				}

				.taty {
					// margin-top: 40rpx;
					// box-sizing: border-box;
					padding-top: 20rpx;
					overflow: hidden;
					text-overflow: ellipsis;
					white-space: nowrap;
					// position: relative;
					// top: 30rpx;
					width: 130rpx;
					font-size: 26rpx;
					font-family: PingFang SC;
					font-weight: bold;
					color: #fffc00;

					text {
						margin-left: 10rpx;
						font-size: 16rpx;
						font-family: PingFang SC;
						font-weight: bold;
						color: #fffc00;
					}
				}

				.tae {
					text-align: left;
					// position: relative;
					// top: 35rpx;
					font-size: 21rpx;
					font-family: PingFang SC;
					font-weight: 800;
					color: #ff0000;
				}
			}

			// margin-top: 300rpx;
		}
	}

	.coupon {
		position: fixed;
		bottom: 80rpx;
		right: 24rpx;
		width: 150rpx;
		height: 150rpx;
		z-index: 999;
	}

	.header-fix {
		flex: 1;
		height: 100%;
		display: flex;
		// padding-left: 20rpx;
		align-items: center;
		padding-right: 20rpx;

		&-main {
			flex: 1;
			padding-left: 30rpx;
			z-index: 5;
		}
	}
</style>
